import { errorResponse } from "../utils/result.js";
export const errorHandler = (err, req, res, next) => {
  console.error(err);
  res
    .status(err.status || 500)
    .json(errorResponse(err.message || "Internal Server Error"));
};
